home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -websites- / whdload / games / llamatron.lha / LlamatronHD / Install next >
Text File  |  1999-10-03  |  4KB  |  195 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "README")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. (set #where-source "Please select the directory containing the original Llamatron files")
  8.  
  9. (set #install-msg
  10. (cat "\nLlamatron Installation\n\n"
  11.      "You will be asked to select the directory where the\n"
  12.      "original files from the game are. A file called\n"
  13.      "Tron1Meg or Tron512 is required for this installer.\n\n"
  14.      "If you have not installed the game, download it from\n"
  15.      "Aminet in the game/shoot directory. The file is\n"
  16.      "named Llamatron.lha.\n\n"
  17.      "Codetapper/Action in 1999!\n"
  18.      "Visit http://zap.to/action/ for more installs!"
  19. ))
  20.  
  21. ;****************************
  22.  
  23. ;----------------------------
  24. ; Checks if given program is reachable via the path
  25. ; if not abort install
  26. ; IN:  #program - to check
  27. ; OUT: -
  28.  
  29. (procedure P_chkrun
  30.   (if
  31.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  32.     ("")
  33.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  34.   )
  35. )
  36.  
  37. ;----------------------------
  38. ; Wait for inserting disk
  39. ; IN:  #AD_disk - name of disk
  40. ; OUT: -
  41.  
  42. (procedure P_disk
  43.   (askdisk
  44.     (dest #AD_disk)
  45.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  46.     (help @askdisk-help)
  47.   )
  48. )
  49.  
  50. ;****************************
  51.  
  52. (if
  53.   (exists #readme-file)
  54.   (if
  55.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  56.     ("")
  57.     (run ("SYS:Utilities/More %s" #readme-file))
  58.   )
  59. )
  60.  
  61. (set #program "WHDLoad")
  62. (P_chkrun)
  63.  
  64. (set @default-dest
  65.   (askdir
  66.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  67.     (help @askdir-help)
  68.     (default @default-dest)
  69.     (disk)
  70.   )
  71. )
  72. (set #dest (tackon @default-dest @app-name))
  73. (if
  74.   (exists #dest)
  75.   (
  76.     (set #choice
  77.       (askbool
  78.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  79.         (default 1)
  80.         (choices "Delete" "Skip")
  81.         (help @askbool-help)
  82.       )
  83.     )
  84.     (if
  85.       (= #choice 1)
  86.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  87.     )
  88.   )
  89. )
  90. (makedir #dest
  91.   (help @makedir-help)
  92.   (infos)
  93. )
  94.  
  95. ;----------------------------
  96.  
  97. (copyfiles
  98.   (help @copyfiles-help)
  99.   (source ("%s.Slave" @app-name))
  100.   (dest #dest)
  101. )
  102. (if
  103.   (exists ("%s.newicon" @app-name))
  104.   (set #icon
  105.     (askchoice
  106.       (prompt "\nWhich icon do you like to install ?\n")
  107.       (default 0)
  108.       (choices "Normal" "NewIcon")
  109.       (help @askchoice-help)
  110.     )
  111.   )
  112.   (set #icon 0)
  113. )
  114. (select #icon
  115.   (set #icon ("%s.inf" @app-name))
  116.   (set #icon ("%s.newicon" @app-name))
  117. )
  118. (copyfiles
  119.   (help @copyfiles-help)
  120.   (source #icon)
  121.   (newname ("%s.info" @app-name))
  122.   (dest #dest)
  123. )
  124. (if
  125.   (exists #readme-file)
  126.   (copyfiles
  127.     (help @copyfiles-help)
  128.     (source #readme-file)
  129.     (dest #dest)
  130.   )
  131. )
  132. (if
  133.   (exists ("%s.info" #readme-file))
  134.   (copyfiles
  135.     (help @copyfiles-help)
  136.     (source ("%s.info" #readme-file))
  137.     (dest #dest)
  138.   )
  139. )
  140. (if
  141.   (= #sub-dir "")
  142.   ("")
  143.   (
  144.     (set #dest (tackon #dest #sub-dir))
  145.     (makedir #dest
  146.       (help @makedir-help)
  147.     )
  148.   )
  149. )
  150.  
  151. ;----------------------------
  152.  
  153. (message #install-msg)
  154.  
  155. ;----------------------------
  156.  
  157. (set #sourcedir
  158.     (askdir
  159.         (prompt #where-source)
  160.         (help @askdir-help)
  161.         (default "RAM:")
  162.     )
  163. )
  164.  
  165. ;----------------------------
  166.  
  167. (set #version
  168.   (askchoice
  169.     (prompt "\nWhich version would you like to install?\n")
  170.     (default 0)
  171.     (choices "1Mb version (recommended)" "512k version")
  172.     (help @askchoice-help)
  173.   )
  174. )
  175. (select #version
  176.   (set #version "Tron1Meg")
  177.   (set #version "Tron512")
  178. )
  179.  
  180. ;----------------------------
  181.  
  182. (set #sourcefile (tackon #sourcedir #version))
  183.  
  184. (copyfiles
  185.   (help @copyfiles-help)
  186.   (source #sourcefile)
  187.   (dest #dest)
  188. )
  189.  
  190. ;----------------------------
  191.  
  192. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  193.  
  194. (exit)
  195.